#include "BConcreteBuilder.h"
#include "iostream"

namespace Builder{
    void BConcreteBuilder::buildPartA() const {
        std::cout << "BConcreteBuilder->partA" << std::endl;
        this->product->setPartA();
    }

    void BConcreteBuilder::buildPartB() const {
        std::cout << "BConcreateBuilder->partB" << std::endl;
        this->product->setPartB();
    }

    void BConcreteBuilder::buildPartC() const {
        std::cout << "BConcreteBuilder->partC" << std::endl;
        this->product->setPartC();
    }

    BConcreteBuilder::BConcreteBuilder() {
        this->product = new BConcreteProduct{};
    }

    BProduct* BConcreteBuilder::getResult() {
        this->buildPartA();
        this->buildPartB();
        this->buildPartC();

        return this->product;
    }
}
